<?php
session_start();
include('databaseconnection.php');
//include ('header2.php');
$oldemail=$_SESSION['email'];
//echo $oldemail;
$email=$_POST['email']; 
//echo $email;
$firstname=$_POST['first'];
 //echo $firstname;
  $lastname=$_POST['last']; 
  //echo $lastname;
  $gender=$_POST['gender']; 
  //echo $gender;
  $dob=$_POST['dob'];
  //echo $dob;
  $country=$_POST['country'];
//echo $country;  
  $language=$_POST['language']; 
 // echo $language;
  $qualification=$_POST['qualification']; 
 // echo $qualification;
  $linked_in= $_POST['linked_in']; 
 // echo $linked_in;
  $short_bio=$_POST['short_bio']; 
  //echo $short_bio;
 
  
  if($email=="" || $firstname=="" || $lastname=="" || $gender=="" || $dob==""  || $country=="" || $language=="" || $qualification=="" ||
  $short_bio==""  )
  {
 /*echo "<table width='100%' height='82' border='1' class='table' align='left'>";
 echo "<tr><td>Please enter all Details, to <a href='account_setting.php'>Back</a></td></tr>";
 echo "</table>";*/
 header("Location:account_setting.php?msgsa=Please enter all required data");
  }
  else
  {
 mysql_query("UPDATE user SET email='$email', first_name='$firstname', last_name='$lastname', gender='$gender', date_of_birth='$dob', country='$country', language='$language',qualification='$qualification',linked_in='$linked_in',short_bio='$short_bio'
WHERE email = '$oldemail'");
/*echo "<table width='960px' height='82' border='1' class='table' align='left'>";
 echo "<tr><td>Changes are saved, to <a href='account_setting.php'>View</a></td></tr>";
 echo "</table>";*/
 header("Location:account_setting.php?msgsa=Changes are saved.....");
  }
  ?>